﻿
namespace DTO_QLNS
{
    public class BookDTO : TransferObject
    {
        public BookDTO()
        { }

        public BookDTO(BookDTO book)
        {
            _BookID = book.BookID;
            _Category = book.Category;
            _Publisher = book.Publisher;
            _BookName = book.BookName;
            _CurrentPrice = book.CurrentPrice;
            _ImagePath = book.ImagePath;
            _Author = book.Author;
            _Content = book.Content;
        }

        public BookDTO(int id, GenreDTO cat, PublisherDTO pub, string name, double price, string imgPath, AuthorDTO author, string content)
        {
            _BookID = id;
            _Category = cat;
            _Publisher = pub;
            _BookName = name;
            _CurrentPrice = price;
            _ImagePath = imgPath;
            _Author = author;
            _Content = content;
        }

        private int _BookID;
        public int BookID
        {
            get { return _BookID; }
            set { _BookID = value; }
        }

        private GenreDTO _Category = new GenreDTO();
        public GenreDTO Category
        {
            get { return _Category; }
            set { _Category = value; }
        }

        private PublisherDTO _Publisher = new PublisherDTO();
        public PublisherDTO Publisher
        {
            get { return _Publisher; }
            set { _Publisher = value; }
        }

        private string _BookName;
        public string BookName
        {
            get { return _BookName; }
            set { _BookName = value; }
        }

        private double _CurrentPrice;
        public double CurrentPrice
        {
            get { return _CurrentPrice; }
            set { _CurrentPrice = value; }
        }

        private string _ImagePath;
        public string ImagePath
        {
            get { return _ImagePath; }
            set { _ImagePath = value; }
        }

        private AuthorDTO _Author = new AuthorDTO();
        public AuthorDTO Author
        {
            get { return _Author; }
            set { _Author = value; }
        }

        private string _Content;
        public string Content
        {
            get { return _Content; }
            set { _Content = value; }
        }
    }
}
